package cn.ztuo.bitrade.dao;

import cn.ztuo.bitrade.dao.base.BaseDao;
import cn.ztuo.bitrade.entity.Cesspit;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface CesspitDao extends BaseDao<Cesspit> {
    List<Cesspit> findByStatus(Long status);


    @Modifying
    @Query(value = "select * from cesspit where min > :number and status = 1 ORDER BY min ASC ",nativeQuery = true)
    List<Cesspit> selectGtMin(@Param(value = "number") Long number);
}
